{%include file="header.html" %} 
        <div id="page" style="display: block;">
            {%include file="top.html" %} 
			{%include file="shadow.html" %} 
			
            <div class="wrapper" style="width: 1170px;">

			<form  id="form_search_user" action="?" method="get">

                <div class="board" id="ctx_bar">
                   
					<div  style="	height:59px;">
                        <div class="shopping">
							
							<div class="sort">
								<div class="cur">
									<span class="select_name">
										TA喜欢的游戏
									</span>
									<input type="hidden" name="topic_id" id="topic_id" value="">
									<span class="arrow">
									</span>
									<ul>
									<li value=""><a>TA喜欢的游戏</a></li>
									{%section name=count loop=$g_show.topic_list%}
									<li value="{%$g_show.topic_list[count].id%}"><a>{%$g_show.topic_list[count].topic%}</a></li>
									{%/section%}
									</ul>
								</div>
							</div>
							
							<div class="sort">
								<div class="cur">
									<span class="select_name">
										性别
									</span>
									<input type="hidden" name="sex" id="sex" value="">
									<span class="arrow">
									</span>
									<ul>
									<li value=""><a>性别</a></li>
										<li value="1" ><a>男</a></li>
										<li value="0"><a>女</a></li>
									</ul>
								</div>
							</div>
							
							<div class="sort" type="province_id">
								<div class="cur" >
									<span class="select_name">省份</span>
									<input type="hidden" name="province_id" id="province_id" value="">
									<span class="arrow">
									</span>
									<ul>
									<li value=""><a>省份</a></li>
									{%section name=count loop=$g_show.province%}
										<li value="{%$g_show.province[count].id%}"><a>{%$g_show.province[count].name%}</a></li>
									{%/section%}
									</ul>
								</div>
							</div>

							<div class="sort">
								<div class="cur" >
									<span class="select_name">
										市区
									</span>
									<input type="hidden" name="city_id" id="city_id" value="">
									<span class="arrow">
									</span>
									<ul id="select_city_ul">
									<li value=""><a>市区</a></li>
									{%section name=count loop=$g_show.city_list%}
										<li value="{%$g_show.city_list[count].id%}"><a>{%$g_show.city_list[count].name%}</a></li>
									{%/section%}
									</ul>
								</div>
							</div>
							
							<div class="sort">
								<div class="cur">
									<span class="select_name">等级</span>
									<input type="hidden" name="verified_type" id="verified_type" value="">
									<span class="arrow">
									</span>
									<ul>
									<li value=""><a>等级</a></li>
										<li value="220"><a>达人</a></li>
									</ul>
								</div>
							</div>

							<div class="sort">
								<div class="cur">
									<span class="select_name">
										年龄
									</span><input type="hidden" name="age" id="age" value="">
									<span class="arrow">
									</span>
									<ul>
										<li value=""><a>年龄</a></li>
										<li value="15"><a>12-18</a></li>
										<li value="21"><a>18-24</a></li>
										<li value="27"><a>24-30</a></li>
										<li value="33"><a>30-36</a></li>
									</ul>
								</div>
							</div>
				
							<div class="search-item" action="/search/people/?q=d" id="search_result_form">
							<input placeholder="搜索你喜欢的" name="key" value="">
							
							<a class="go search_user_submit">
							</a>
							 </div>
                    
					</div>
                </div>
				</div>
				</form>
                <div id="waterfall" style="height: 1170px;">
                    {%section name=count loop=$g_show.list%}
					<div class="pin user wfc"  data-id="{%$g_show.list[count].uid%}">
                        <a class="img x" title="{%$g_show.list[count].detail_info.name%}" href="/user/?uid={%$g_show.list[count].uid%}">
                            <img width=180 height=180 src="{%$g_show.list[count].detail_info.big_header%}" alt=" {%$g_show.list[count].detail_info.name%} ">
							{%if $g_show.list[count].detail_info.online_status == 1%}
							<a class="show-mblog-tag" href="/user/?uid={%$g_show.list[count].uid%}">微博在线</a>
							{%/if%}
							
                        </a>
                       
                       
						<h2>
						{%if $g_show.list[count].detail_info.verified_type == 0%}
							<i class=" icon_yellow_v" title="新浪个人认证"></i>
							{%/if%}
							{%if $g_show.list[count].detail_info.verified_type > 0 and $g_show.list[count].verified_type <= 7%}
							<i class=" icon_blue_v" title="新浪机构认证"></i>
							{%/if%}
							{%if $g_show.list[count].detail_info.verified_type == 220%}
							<i class=" icon_daren" title="新浪达人认证"></i>
							{%/if%}
							{%if $g_show.list[count].sex==0%}<em class="W_ico12 female" title="女"></em>{%else%}
							<em class="W_ico12 male" title="男"></em>
							{%/if%}
                            {%$g_show.list[count].detail_info.name%} 

							
							
                        </h2>
                       
						<div class="actions">
                            <div class="right">
                                <a href="javascript:void(0);" onclick="return false;" class="like add_unlike btn btn11 wbtn " uid="{%$g_show.list[count].uid%}">
                                    <strong>
                                        <em>
                                        </em>
                                       	 换一个
                                    </strong>
                                    <span>
                                    </span>
                                </a>
                               
                            </div>
							</div>
                        <a class="followuser btn btn13 wbtn user_relation" onclick="return false;" href="#"
                        data-id="dworld" uid="{%$g_show.list[count].uid%}">
                            <strong class="add_atten">
                                关注
                            </strong>
                            <span>
                            </span>
                        </a>
                    </div>
					{%/section%}
                </div>

				<div class="page-v3" >{%$g_show.page_bar%}</div>
                <div class="loading">
                    <img src="/img/loading.gif">
                    <span>
                        正在加载...
                    </span>
                </div>
            </div>
        </div>
        <div class="clear">
        </div>
   
	{%include file="footer_js.html" %} 

<script>


	var container = $("#waterfall");
		container.masonry({
			    itemSelector: ".wfc",
				columnWidth: function( containerWidth ) {
				return containerWidth / 5;
			  }
			  });

$(document).ready(function(){

	

	$("#form_search_user").find(".sort").find(".cur").live("click",function(e){
		$(this).find("ul").toggle();
	});

	$("#form_search_user").find(".sort").find("li").die("click");
	$("#form_search_user").find(".sort").find("li").live("click",function(e){
		var get_val = $(this).attr("value");
		var get_name = $(this).find("a").html();
		$(this).parents(".sort").find(".select_name").html(get_name);
		$(this).parents(".sort").find("input").val(get_val);
		
		if($(this).parents(".sort").attr("type")=="province_id")
		{
			get_city_list_by_id(get_val);
		}
		
	});

	
	$(".search_user_submit").bind("click",function(e){
		$("#form_search_user").submit();
	});


	function get_city_list_by_id(id)
	{
		if(!id)
		{
			var html ='<li value=""><a>市区</a></li>';
			$("#select_city_ul").html(html);
			$("#city_id").val("");
			return;
		}
		$.getJSON("/interface/common/json_get_city_by_province.php?t=jsonp&id="+id+"&callback=?", function(json){
		if(typeof(json)!='undefined')
		{
			if(json.error ==1)
			{
				YOUXIXIU.MAIN.Tips.Show(json.errmsg);
			}
			else
			{
				var html ='<li value=""><a>市区</a></li>';
				var city_data = json.list;

				for(var i in city_data)
				{ 
					html += "<li value="+i+"><a>"+city_data[i]+"</a></li>";
				} 
				$("#select_city_ul").html(html);

			}

			
			
		}
		});
	}
	

	YOUXIXIU.MAIN.BindAddAtten.bind_add_atten({
		"tml_add_div":"<strong class='add_atten'>关注</strong> <span></span>",
		"tml_yijing_div":"<strong class='del_atten'>已经关注</strong> <span></span>",
		"tml_huxiang_div":"<strong class='del_atten'>互相关注</strong> <span></span>"
		
		});

});


	


</script>

   {%include file="footer.html" %} 